package com.xuelangyun.form.exterauth.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xuelangyun.form.api.exterauth.form.LogForm;
import com.xuelangyun.form.common.utils.PageUtils;
import com.xuelangyun.form.common.utils.R;
import com.xuelangyun.form.exterauth.service.ISysExterLogService;

import io.swagger.annotations.Api;

/**
 * 外部应用访问日志记录
 *
 * @author weiqing.hk
 * @date 2024-05-25 14:06:47
 */
@RestController
@RequestMapping("exter/log")
@Api(value = "外部应用访问日志记录API", tags = {"外部应用访问日志记录-通用"})
public class SysExterApiLogController {

    @Autowired
    private ISysExterLogService logService;

    @GetMapping("/list")
    @RequiresPermissions("exter:log")
    public R<Object> accessLogs(LogForm form) {
        PageUtils pu = logService.queryPage(form);
        return R.ok().setData(pu);
    }

}
